Effects/API/jQuery - Sample Code
animate(params, [duration], [easing], [callback])
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="/jquery/js/jquery.js"></script>
<script>
$(document).ready(function(){
$("#animate").click(function(){
$(".block").animate(
{height: "toggle", opacity: "toggle"},
"slow"
);
});
});
</script>
<style>
div {
position:absolute;
background-color:#abc;
left:50px;
width:90px;
height:90px;
margin:5px;
}
</style>
</head>
<body>
<button id="animate">animate</button>
<div class="block"></div>
</body>
</html>
[実行結果]